﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MechanicCalculator
{
    public partial class SerialDialog : Form
    {
        public SerialDialog()
        {
            InitializeComponent();
        }

        private void textBox4_TextChanged(object sender, EventArgs e)
        {

        }

        private void btnRegister_Click(object sender, EventArgs e)
        {
            if (tbUserName.Text == "Tuan")
            {
                if (tbSerial1.Text == "123" && tbSerial2.Text == "456" && tbSerial3.Text == "789")
                {
                    this.DialogResult = DialogResult.OK;
                    return;

                }
            }

            this.DialogResult = DialogResult.Abort;
        }
    } 
}
